<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>商品管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../style/index.css">
    <style>
        .el-badge__content {
            z-index: 1;
        }

        #user .el-dialog {
            margin-top: 10px !important;
            margin: 0 auto 10px;
        }

        #user .el-dialog__header {
            padding: 15px 15px 0;
        }

        #user .el-dialog__body {
            padding: 0 15px 0;
        }

        #user .el-input.is-disabled .el-input__inner {
            color: #000;
            background-color: #fff;
        }
        #batch .el-radio{
            margin-right: 0;
        }
        #batch .el-input-group__append{
            padding: 0 10px;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak class="minWidth">
        <el-form :inline="true" :form="form">
            <el-form-item>
                <el-button type="danger" @click="window.history.back()">返回</el-button>
            </el-form-item>
            <el-form-item>
                <el-input v-model.trim="form.Article_SerialNumber" clearable placeholder="请输入商品内码"/>
            </el-form-item>
            <el-form-item>
                <el-input v-model.trim="form.Article_Name" clearable placeholder="请输入商品名称" />
            </el-form-item>
            <el-form-item>
                <!-- <el-input v-model.trim="form.Supplier_Name" clearable placeholder="请输入供应商名称" /> -->
                <el-select clearable v-model.trim="form.Supplier_Name" placeholder="请选择供应商名称" filterable style="width: 100%">
                    <el-option v-for="(item,index) in supplier" :key="index" :label="item.Supplier_Name" :value="item.Supplier_Name"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-select clearable v-model.trim="form.Brand_SerialNumber" placeholder="请选择商品品牌" filterable
                    style="width: 100%">
                    <el-option v-for="(item,index) in brand" :key="index" :label="item.Brand_Name"
                        :value="item.Brand_SerialNumber"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-cascader v-model="business_article_classify" clearable placeholder="请选择分类汇总" filterable collapse-tags
                    :props="defaultProps" :options="classify" style="width: 100%"></el-cascader>
            </el-form-item>
            <el-form-item>
                <el-row class="interval" style="width: 217px;">
                    <el-col :span="11">
                        <el-input v-model.trim="form.Purchase_Unit_Price1" clearable placeholder="一键代发价" />
                    </el-col>
                    <el-col style="text-align: center;" :span="2">-</el-col>
                    <el-col :span="11">
                        <el-input v-model.trim="form.Purchase_Unit_Price2" clearable placeholder="一键代发价" />
                    </el-col>
                </el-row>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSerach">查询</el-button>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="()=>{this.$refs.multipleTable.clearSelection()}">清空已选</el-button>
            </el-form-item>
            <el-form-item>
                <!-- <el-button type="primary" @click="batchConfig1">批量操作</el-button> -->
                <el-dropdown trigger="click" @command="batchConfig">
                    <el-button type="primary">
                        批量操作<i class="el-icon-arrow-down el-icon--right"></i>
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item command="true">批量同意</el-dropdown-item>
                        <el-dropdown-item command="false">批量拒绝</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </el-form-item>
        </el-form>
        <el-table v-if="table" ref="multipleTable" :data="tableData" stripe border height="calc(100vh - 210px)" style="width: 100%" :row-key="row=>row.Supplier_Article_SerialNumber"
            @selection-change="handleSelectionChange">
            <el-table-column fixed="left" type="selection" :reserve-selection="true" align="center" width="50"></el-table-column>
            <el-table-column fixed="left" align="center" type="index" label="序号" width="50"></el-table-column>
            <el-table-column fixed="left" prop="Article_SerialNumber"  width="150" label="商品内码"></el-table-column>
            <el-table-column fixed="left" prop="Picture_URL" width="140" align="center" label="商品封面">
                <template v-slot="{row}">
                    <el-image fit="contain" :preview-src-list="[BASE_IMG + row.Picture_URL]"
                        :src="BASE_IMG + row.Picture_URL" style="width:100px;height: 100px;"></el-image>
                </template>
            </el-table-column>
            <el-table-column fixed="left" prop="Article_Name" width="150" label="商品名称"></el-table-column>
            <el-table-column fixed="left" prop="Specifications_Name" width="150" label="规格名称"></el-table-column>
            <el-table-column prop="Brand_Name" label="品牌" width="100"></el-table-column>
            <el-table-column prop="Classify_Name" width="200" label="商品分类">
                <template v-slot="{row}">
                    <el-tag size="mini" v-for="(item,index) in row.Classify_Name?row.Classify_Name.split(';'):[]" :key="index">{{item}}</el-tag>
                </template>
            </el-table-column>
            <el-table-column prop="Supplier_Name" label="供应商"></el-table-column>
            <!-- <el-table-column prop="JDCOM_URL" min-width="120" label="商品京东链接"></el-table-column>
            <el-table-column prop="JDCOM_Unit_Price" width="120" label="商品京东价(元)"></el-table-column> -->
            <el-table-column prop="JDCOM_URL1" min-width="120" label="规格京东链接"></el-table-column>
            <el-table-column prop="JDCOM_Unit_Price1" width="120" label="规格京东价(元)"></el-table-column>
            <el-table-column prop="Group" width="120" label="是否参与团购"></el-table-column>
            <el-table-column prop="Purchase_Unit_Price" width="120" label="一键代发价(元)"></el-table-column>
            <el-table-column prop="Quantity" width="120" label="每日供应库存"></el-table-column>
            <el-table-column fixed="right" align="center" label="操作" width="180">
                <template v-slot="{row}">
                    <el-button type="success" size="small" @click="Show(row)">详情</el-button>
                    <!-- <el-button type="primary" size="small" @click="examine('Edit',row)">编辑</el-button> -->
                    <!-- <el-dropdown size="small" trigger="click" @command="examine($event,row)">
                        <el-button size="small" type="primary">
                            更多<i class="el-icon-arrow-down el-icon--right"></i>
                        </el-button>
                        <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item command="true">通过</el-dropdown-item>
                            <el-dropdown-item command="false">拒绝</el-dropdown-item>
                            <el-dropdown-item command="Edit">编辑</el-dropdown-item>
                        </el-dropdown-menu>
                    </el-dropdown> -->
                </template>
            </el-table-column>
        </el-table>
        <el-pagination style="margin-top: 5px;" background @size-change="handleSizeChange"
            @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[10, 20, 30, 50]"
            :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
        </el-pagination>
        <show-detail :visible.sync="dialogVisible" :data="Article_SerialNumber"></show-detail>
        <batch-review :visible.sync="dialogVisible1" :data="multipleSelection" @success="success"></batch-review>
    </div>
    <script type="text/javascript" src="../../../utils/wangeditor.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../utils/vuex.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../component/component.js"></script>
    <script type="text/javascript" src="../../../config/config.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.min.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.full.min.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.core.min.js"></script>
    <script type="text/javascript" src="../../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="js/examine.js"></script>
</body>

</html>